<template>
	<!-- 用户信息 -->
	<view
		v-show="show"
		class="user-info"
		@click="changeShow"
		:style="{
			'margin-top': marginTop ? '48rpx' : '0',
		}">
		<view class="img">
			<image
				src="/static/images/chicken/chicken_1.png"
				mode="widthFix"></image>
		</view>
		<view class="info">
			<view class="hidden-1">张三三的农场</view>
			<view>
				<image 
					src="/static/images/chicken/level_1.png"
					mode="widthFix"></image>
				<text>LV.1</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false,
			},
			isEditName: {
				type: Boolean,
				default: false,
			},
			marginTop: {
				type: Boolean,
				default: false,
			},
		},
		data() {
			return {}
		},
		methods: {
			changeShow() {
				if (!this.isEditName) return;
				this.$emit('changeShow', 'editNameShow');
			},
		}
	}
</script>

<style>
</style>